fixup sip
[lcr.git] / interface.h
index 09e0778..040c412 100644 (file)
@@ -49,9 +49,12 @@ struct interface_port {
        int                     ptmp; /* force load stack in PTP mode */
        int                     nt; /* load stack in NT-mode */
        int                     tespecial; /* special TE-mode behavior */
-       int                     l2hold; /* hold layer 2 (1=force, -1=disable */
+       int                     l1hold; /* hold layer 1 (1=on, 0=off) */
+       int                     l2hold; /* hold layer 2 (1=force, -1=disable, 0=default) */
+       unsigned int            ss5; /* set, if SS5 signalling enabled, also holds feature bits */
        int                     channel_force; /* forces channel by protocol */
        int                     nodtmf; /* disables DTMF */
+       int                     dtmf_threshold; /* DTMF level threshold */
        struct select_channel   *out_channel; /* list of channels to select */
        struct select_channel   *in_channel; /* the same for incoming channels */
        int                     block; /* set if interface is blocked */
@@ -62,6 +65,11 @@ struct interface_port {
         int                    tout_disconnect;
 //     int                     tout_hold;
 //     int                     tout_park;
+       int                     dialmax; /* maximum number of digits to dial */
+       int                     nonotify; /* blocks outgoing notify messages  */
+       int                     pots_flash; /* allow flash button / keypulse to hold active call */
+       int                     pots_ring; /* after hangup let calls on hold ring the phone */
+       int                     pots_transfer; /* after hangup, two calls are transfered */
 };
 
 struct interface_msn {
@@ -82,9 +90,13 @@ struct interface_screen {
 struct interface {
        struct interface        *next;
        char                    name[64]; /* name of interface */
+       int                     app; /* application to use for interface (0 = PBX) */
+       char                    bridge_if[64]; /* name of destination interface for bridge application */
+       int                     external; /* interface used for external calls */
        int                     extension; /* calls are handled as extension */
        int                     is_tones; /* generate tones */
        int                     is_earlyb; /* bridge tones during call setup */
+       int                     shutdown; /* interface will not automatically be loaded */
        int                     hunt; /* select algorithm */
        int                     hunt_next; /* ifport index to start hunt */
        struct interface_port   *ifport; /* link to interface port list */
@@ -92,9 +104,47 @@ struct interface {
        struct interface_screen *ifscreen_in; /* link to screening list */
        struct interface_screen *ifscreen_out; /* link to screening list */
        int                     tx_gain, rx_gain; /* filter gain */
+       char                    tones_dir[128];
        char                    pipeline[256]; /* filter pipeline */
        unsigned char           bf_key[56]; /* filter blowfish */
        int                     bf_len; /* filter length of blowfish */
+       int                     remote; /* interface is a remote app interface */
+       char                    remote_app[32]; /* name of remote application */
+       char                    remote_context[128]; /* context feld to use for remote application */
+#ifdef WITH_GSM_BS
+       int                     gsm_bs; /* interface is an GSM BS interface */
+       char                    gsm_bs_name[32]; /* name of bs */
+       int                     gsm_bs_hr; /* prefer half rate for MOT calls */
+#if 0
+       int                     gsm_bs_payloads;
+       unsigned char           gsm_bs_payload_types[8];
+#endif
+#endif
+#ifdef WITH_GSM_MS
+       int                     gsm_ms; /* interface is an GSM MS interface */
+       char                    gsm_ms_name[32]; /* name of ms */
+#endif
+#ifdef WITH_SIP
+       int                     sip; /* interface is a SIP interface */
+       char                    sip_local_peer[128];
+       char                    sip_remote_peer[128];
+       char                    sip_asserted_id[128];
+       char                    sip_auth_user[128];
+       char                    sip_auth_password[128];
+       char                    sip_auth_realm[128];
+       int                     sip_register;
+       char                    sip_register_user[128];
+       char                    sip_register_host[128];
+       int                     sip_register_interval; /* interval to register */
+       int                     sip_options_interval; /* timer to keepalive invite/register transactions */
+       char                    sip_public_ip[128];
+       char                    sip_stun_server[128];
+       int                     sip_stun_interval; /* timer to check own IP address */
+       void                    *sip_inst; /* sip instance */
+       unsigned short          rtp_port_from;
+       unsigned short          rtp_port_to;
+#endif
+       int                     rtp_bridge; /* bridge RTP directly (for calls comming from interface) */
 };
 
 struct interface_param {
@@ -113,7 +163,8 @@ extern char interface_error[256];
 struct interface *read_interfaces(void);
 void free_interfaces(struct interface *interface_start);
 void relink_interfaces(void);
-void load_port(struct interface_port *ifport);
+void load_mISDN_port(struct interface_port *ifport);
 void doc_interface(void);
-void do_screen(int out, char *id, int idsize, int *type, int *present, struct interface *interface);
+void do_screen(int out, char *id, int idsize, int *type, int *present, const char *interface_name);
+struct interface *getinterfacebyname(const char *name);