[Asterisk-Dev] regexten

Carlos E. Bieberach carlos at biesystems.com
Wed Jul 27 15:16:41 MST 2005


Hello,
I'm new to Asterisk. Anybody can point me to some Visual Basic examples on
how to talk to an Asterisk Server ?

Thanks,

biesys


-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com]On Behalf Of Diego Aguirre
Sent: Wednesday, July 27, 2005 5:03 PM
To: Asterisk Developers Mailing List
Subject: [Asterisk-Dev] regexten


Hi all,

I have created this patch for regexten, maybe useful...

in sip.conf add this for yours [friends]

[test]
regcontext=registered-peers
regexten=5551

it can be acessed from extension.conf this form..

[default]
include => registered-peers

exten => _555X,2,Set(dialto=${DB(regexten/${EXTEN})})
exten => _555X,3,Dial(SIP/${dialto},60,rtT)
exten => _555X,4,Hangup()






diff -Naur asterisk-1.0.9/channels/chan_iax2.c
asterisk-1.0.9-new/channels/chan_iax2.c
--- asterisk-1.0.9/channels/chan_iax2.c 2005-05-31 09:58:08.000000000 -0300
+++ asterisk-1.0.9-new/channels/chan_iax2.c     2005-07-27
17:47:21.000000000 -0300
@@ -4369,9 +4369,15 @@
                 stringp = multi;
                 while((ext = strsep(&stringp, "&"))) {
                         if (onoff)
+                       {
+                               ast_db_put("IAX2-regexten", ext,
peer->name);
                                 ast_add_extension(regcontext, 1, ext,
1, NULL, "Noop", strdup(peer->name), free, type);
+                       }
                         else
+                       {
+                               ast_db_del("IAX2-regexten", ext);

ast_context_remove_extension(regcontext, ext, 1, NULL);
+                       }
                 }
         }
  }
diff -Naur asterisk-1.0.9/channels/chan_sip.c
asterisk-1.0.9-new/channels/chan_sip.c
--- asterisk-1.0.9/channels/chan_sip.c  2005-06-21 11:15:55.000000000 -0300
+++ asterisk-1.0.9-new/channels/chan_sip.c      2005-07-27
17:46:49.000000000 -0300
@@ -4331,9 +4331,15 @@
                 stringp = multi;
                 while((ext = strsep(&stringp, "&"))) {
                         if (onoff)
+                       {
+                               ast_db_put("SIP-regexten", ext, peer->name);
                                 ast_add_extension(regcontext, 1, ext,
1, NULL, "Noop", strdup(peer->name), free, type);
+                       }
                         else
+                       {
+                               ast_db_del("SIP-regexten", ext);

ast_context_remove_extension(regcontext, ext, 1, NULL);
+                       }
                 }
         }
  }



--

--
Diego Aguirre
Infodag - Informática
FWD#: 459696
Nikotel#: 99 21 8138-2710
_______________________________________________
Asterisk-Dev mailing list
Asterisk-Dev at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-dev
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev






More information about the asterisk-dev mailing list